package oj;

import java.util.HashSet;
import java.util.Scanner;

public class Day28F {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (sc.hasNext()){
            long n=sc.nextLong();
            if(n==0){
                break;
            }
            long sum= (long) Math.pow(5,n);
            long last=(long) Math.pow(4,n);
            System.out.print(sum-4+" ");
            System.out.println(last+n-4);//老猴子最终得到的是分剩下的+n个小猴子每个给一个就是n
        }
    }
}
